/**
  ******************************************************************************
  * @file           : tskcfg.h
  * @brief          : Header for main.c file.
  *                   This file contains the common defines of the application.
  ******************************************************************************
  * @attention
  *
  ******************************************************************************
  */

/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef __TSKCFG_H
#define __TSKCFG_H

/* Includes ------------------------------------------------------------------*/
#include <stdio.h>

#include "FreeRTOS.h"
#include "task.h"
#include "timers.h"
#include "queue.h"
#include "semphr.h"
#include "event_groups.h"

#define RUNDOG_TSK_PRIORITY                                       (tskIDLE_PRIORITY + 1)
#define RUNDOG_STACK_SIZE                                         1024u
extern TaskHandle_t xRunDog_Thd;
extern StaticTask_t xRunDog_Tcb;
extern StackType_t  xRunDog_Stk[ RUNDOG_STACK_SIZE ];
void vRunDog_Task( void * pvParameters );

#define TTY_TSK_PRIORITY                                          (tskIDLE_PRIORITY + 2)
#define TTY_STACK_SIZE                                            512u
extern TaskHandle_t xTerminal_Thd;
extern StaticTask_t xTerminal_Tcb;
extern StackType_t  xTerminal_Stk[ TTY_STACK_SIZE ];
extern void vTerminal_Task( void * pvParameters );

#define STGPARA_TSK_PRIORITY                                      (tskIDLE_PRIORITY + 2)
#define STGPARA_STACK_SIZE                                        512u
extern TaskHandle_t xStoragePara_Thd;
extern StaticTask_t xStoragePara_Tcb;
extern StackType_t  xStoragePara_Stk[ STGPARA_STACK_SIZE ];
extern void vStoragePara_Task( void * pvParameters );

#ifdef EDCT_JUST_PRESS
  #define GUI_TSK_PRIORITY                                        (tskIDLE_PRIORITY + 3)
  #define GUI_STACK_SIZE                                          512u
  extern TaskHandle_t xGui_Thd;
  extern StaticTask_t xGui_Tcb;
  extern StackType_t  xGui_Stk[ GUI_STACK_SIZE ];
  extern void vGui_Task( void * pvParameters );
#else
  #define SGP30_TSK_PRIORITY        															 (tskIDLE_PRIORITY + 4)
  #define SGP30_STACK_SIZE            															512u
  extern TaskHandle_t xSgp30_Thd;
  extern StaticTask_t xSgp30_Tcb;
  extern StackType_t  xSgp30_Stk[ SGP30_STACK_SIZE ];
  extern void vSgp30_Task(void * pvParameters);
  
  #define NH3CO2_TSK_PRIORITY                                      (tskIDLE_PRIORITY + 5)
  #define NH3CO2_STACK_SIZE                                        512u
  extern TaskHandle_t xNH3CO2_Thd;
  extern StaticTask_t xNH3CO2_Tcb;
  extern StackType_t  xNH3CO2_Stk[ NH3CO2_STACK_SIZE ];
  extern void vNH3CO2_Task( void * pvParameters );
#endif

#define SDP810_TSK_PRIORITY        															 (tskIDLE_PRIORITY + 6)
#define SDP810_STACK_SIZE            															512u
extern TaskHandle_t xSdp810_Thd;
extern StaticTask_t xSdp810_Tcb;
extern StackType_t  xSdp810_Stk[ SDP810_STACK_SIZE ];
extern void vSdp810_Task(void * pvParameters);

/* Sht30 task */
#define SENSORMAIN_TSK_PRIORITY        														(tskIDLE_PRIORITY + 7)
#define SENSORMAIN_STACK_SIZE            													1024u
extern TaskHandle_t xSensorMain_Thd;
extern StaticTask_t xSensorMain_Tcb;
extern StackType_t  xSensorMain_Stk[ SENSORMAIN_STACK_SIZE ];
extern void vSensorMain_Task(void * pvParameters);

/* lora task */
#define LORARECV_TSK_PRIORITY                                    (tskIDLE_PRIORITY + 8)
#define LORARECV_STACK_SIZE                                      1024u
extern TaskHandle_t xLoRaRecv_Thd;
extern StaticTask_t xLoRaRecv_Tcb;
extern StackType_t  xLoRaRecv_Stk[ LORARECV_STACK_SIZE ];
extern void vLoRaReceive_Task(void * pvParameters);


extern QueueHandle_t Storage_qhd;

extern void APP_CreateTask(void);

#endif /* __TSKCFG_H */

/************************ END OF FILE *********/
